package bb.lanxing.lib.devices.ble.ble.characteristic;

import java.io.Serializable;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;

public enum BodySensorLocation implements Serializable {
    Other((byte) 0),
    Chest((byte) 1),
    Wrist((byte) 2),
    Finger((byte) 3),
    Hand((byte) 4),
    EarLobe((byte) 5),
    Foot((byte) 6),
    Reserved((byte) 7);
    
    public static final Companion Companion = new Companion(null);
    private final byte value;

    BodySensorLocation(byte b) {
        this.value = b;
    }

    public final byte getValue() {
        return this.value;
    }

    public static final class Companion {
        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private Companion() {
        }

        public BodySensorLocation from(Byte b) {
            BodySensorLocation[] values;
            for (BodySensorLocation bodySensorLocation : BodySensorLocation.values()) {
                if (b != null && bodySensorLocation.getValue() == b.byteValue()) {
                    return bodySensorLocation;
                }
            }
            return null;
        }
    }
}
